<!-- HTML for static distribution bundle build -->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>GaoAPI</title>
    <link rel="stylesheet" type="text/css" href="{{ asset('swagger-ui/dist/swagger-ui.css') }}">
    <style>
        html {
            box-sizing: border-box;
            overflow: -moz-scrollbars-vertical;
            overflow-y: scroll;
        }

        *,
        *:before,
        *:after {
            box-sizing: inherit;
        }

        body {
            margin: 0;
            background: #fafafa;
        }

        .swagger-ui {
            margin-bottom: 100px;
        }

        .swagger-ui .topbar .download-url-wrapper{
            display: none;
        }
    </style>
</head>

<body>
<div id="swagger-ui"></div>

<script src="/swagger-ui/dist/swagger-ui-bundle.js"></script>
<script src="/swagger-ui/dist/swagger-ui-standalone-preset.js"></script>
<script>
    window.onload = function () {
        // Begin Swagger UI call region
        const ui = SwaggerUIBundle({
            url: "/swagger-ui/config/{{ info.tag }}_openapi.yaml?v={{ version }}",
            dom_id: '#swagger-ui',
            deepLinking: true,
            presets: [
                SwaggerUIBundle.presets.apis,
                SwaggerUIStandalonePreset
            ],
            plugins: [
                SwaggerUIBundle.plugins.DownloadUrl
            ],
            layout: "StandaloneLayout",
            docExpansion: "{% if info.isShowDoc %}list{% else %}none{% endif %}"
        })
        // End Swagger UI call region

        window.ui = ui

        let header_title = document.getElementsByClassName('topbar-wrapper')[0].getElementsByClassName('link')[0];
        header_title.innerHTML = '<a href="/" style="flex:none;font-size: 24px;"><img height="40" src="/images/gaoapi-logo.svg" alt="GaoAPI" style="margin-right: 10px;">GaoAPI</a><img height="40" src="/images/symfony-logo.svg" alt="Symfony" style="margin: 0 30px"><img height="40" src="" alt="Swagger UI">';
        console.log(header_title);
    }
</script>
</body>
</html>
